#!/bin/bash
thread=$1
mpi=$2
mpi_end=`perl -e '{print "'"$mpi"'"-1}'`
if [ -s rankfile ];then
	rm rankfile
fi

for i in `seq 0 1 $mpi_end`
do
	thread_start=`perl -e '{print "'"$i"'"*38}'`
	thread_end=`  perl -e '{print "'"$i"'"*38+"'"$thread"'"-1}'`
	echo rank "$i"=29.204.65.88 slot="$thread_start"-"$thread_end" >> rankfile

done

